<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>plural basic usage examples</title>
    <script src="../../../node_modules/vue/dist/vue.global.js"></script>
    <script src="../../../packages/vue-i18n/dist/vue-i18n.global.js"></script>
  </head>
  <body>
    <div id="app">
      <h2>Car:</h2>
      <p class="p1">{{ $tc('car', 1) }}</p>
      <p class="p2">{{ $tc('car', 2) }}</p>
      <h2>Apple:</h2>
      <p class="p3">{{ $tc('apple', 0) }}</p>
      <p class="p4">{{ $tc('apple', 1) }}</p>
      <p class="p5">{{ $tc('apple', 10, { count: 10 }) }}</p>
      <p class="p6">{{ $tc('apple', 10) }}</p>
      <h2>Banana:</h2>
      <p class="p7">{{ $tc('banana', 1, { n: 1 }) }}</p>
      <p class="p8">{{ $tc('banana', 1) }}</p>
      <p class="p9">{{ $tc('banana', 100, { n: 'too many' }) }}</p>
    </div>
    <script>
      const { createApp } = Vue
      const { createI18n } = VueI18n

      const i18n = createI18n({
        locale: 'en',
        messages: {
          en: {
            car: 'car | cars',
            apple: 'no apples | one apple | {count} apples',
            banana: 'no bananas | {n} banana | {n} bananas'
          }
        }
      })

      const app = createApp({})
      app.use(i18n)
      app.mount('#app')
    </script>
  </body>
</html>
